import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

const actions = {
    backHome(context) {
        context.commit('BACKHOME')
    }
}
const mutations = {
    BACKHOME() {
        this.$router.push("/index/adminPatient")
    }
}
const state = {
    //Patient数据库变动的标志，sign变化则代表数据库发生变动，需要动态更新数据
    sign: 0,
}

const getters = {
    getSign: state => {
        return state.sign
    }
}

export default new Vuex.Store({
    actions,
    mutations,
    state,
    getters
})